    <!-- 引入Bootstrap CSS -->
    <link href="{% static 'bootstrap/bootstrap.min.css' %}" rel="stylesheet">
    <!-- Bootstrap 图标 -->
    <!-- 引入bootstrap-icons -->
    <link rel="stylesheet" href="{% static 'bootstrap-icons-1.13.1/bootstrap-icons.css' %}">
    <link href="{% static 'bootstrap-icons-1.13.1/fonts/bootstrap-icons.woff' %}" rel="stylesheet">
    <link href="{% static 'bootstrap-icons-1.13.1/fonts/bootstrap-icons.woff2' %}" rel="stylesheet">

<div class="container mt-4">
    
    <a href="{% url 'core:class_course_create' %}" class="btn btn-primary mb-3">添加新课程</a>

    <table class="table table-striped table-hover">
        <thead class="thead-dark">
            <tr>
                <th>ID</th>
                <th>班级-科目</th>
                <th>星期</th>
                <th>课时</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            {% for course in courses %}
            <tr>
                <td>{{ course.id }}</td>
                <td>{{ course.class_subject.class_id.name }} - {{ course.class_subject.subject.name }}</td>
                <td>{{ course.get_weekday_display }}</td>
                <td>{{ course.course_period.name|default:'未知' }}</td>
                <td>
                    <a href="{% url 'core:class_course_detail' course.id %}" class="btn btn-info btn-sm">查看</a>
                    <a href="{% url 'core:class_course_update' course.id %}" class="btn btn-warning btn-sm">编辑</a>
                    <a href="{% url 'core:class_course_delete' course.id %}" class="btn btn-danger btn-sm">删除</a>
                </td>
            </tr>
            {% empty %}
            <tr>
                <td colspan="5" class="text-center">暂无课程数据</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
